# makefile
# written by yaolunlun@sina.com
# version 1.0
# last update 09/14/2016

TOP_DIR		:= $(CURDIR)/../../
include $(TOP_DIR)/Env.make

TARGET		:= libcjson.a
SRCS		:= cJSON.c
OBJS		:= $(SRCS:.c=.o)

ARFLAGS		:= rc


all: $(TARGET)

$(TARGET): $(OBJS)
	$(ECHO)echo AR $@
	$(ECHO)$(AR) $(ARFLAGS) $(TARGET) $(OBJS)

%.o: %.c
	$(ECHO)echo CC $@
	$(ECHO)$(CC) $(CFLAGS) -c -o $@ $<

install:

clean:
	$(RM) *.o
	$(RM) $(TARGET)

	
.PHONY: all clean $(TARGET)

